import _sfc_main from "./index.vue2.mjs";
import { resolveComponent, createElementBlock, openBlock, createVNode, withCtx, Fragment, renderList, createCommentVNode, createBlock, resolveDynamicComponent, createSlots, renderSlot } from "vue";
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
const _hoisted_1 = { class: "ep-render-form-container" };
const _hoisted_2 = { key: 0 };
const _hoisted_3 = { key: 1 };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_el_form = resolveComponent("el-form");
  return openBlock(), createElementBlock("div", _hoisted_1, [
    createVNode(_component_el_form, {
      ref: "widgetFormRef",
      class: "ep-form-widget-list",
      model: _ctx.formModel,
      "validate-on-rule-change": false,
      "hide-required-asterisk": false,
      "label-position": _ctx.labelPosition,
      "label-width": _ctx.labelWidth,
      size: _ctx.size
    }, {
      default: withCtx(() => [
        (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.widgetListFilter, (widget, index) => {
          return openBlock(), createElementBlock("div", { key: index }, [
            widget.options.permission < 2 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
              widget.type === "correlation" ? (openBlock(), createElementBlock("div", _hoisted_2, [
                (openBlock(), createBlock(resolveDynamicComponent(`ep-${widget.type}`), {
                  modelValue: _ctx.formModel[widget.options.name],
                  "onUpdate:modelValue": ($event) => _ctx.formModel[widget.options.name] = $event,
                  options: widget.options,
                  "form-data": _ctx.formModel
                }, createSlots({ _: 2 }, [
                  _ctx.$slots.correlation ? {
                    name: "default",
                    fn: withCtx(({ item, remove }) => [
                      renderSlot(_ctx.$slots, "correlation", {
                        item,
                        remove
                      })
                    ]),
                    key: "0"
                  } : void 0,
                  _ctx.$slots.correlationDialog ? {
                    name: "dialog",
                    fn: withCtx(({ options, callback }) => [
                      renderSlot(_ctx.$slots, "correlationDialog", {
                        options,
                        callback
                      })
                    ]),
                    key: "1"
                  } : void 0
                ]), 1032, ["modelValue", "onUpdate:modelValue", "options", "form-data"]))
              ])) : (openBlock(), createElementBlock("div", _hoisted_3, [
                (openBlock(), createBlock(resolveDynamicComponent(`ep-${widget.type}`), {
                  modelValue: _ctx.formModel[widget.options.name],
                  "onUpdate:modelValue": ($event) => _ctx.formModel[widget.options.name] = $event,
                  options: widget.options,
                  "form-data": _ctx.formModel
                }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "form-data"]))
              ]))
            ], 64)) : createCommentVNode("", true)
          ]);
        }), 128))
      ]),
      _: 3
    }, 8, ["model", "label-position", "label-width", "size"])
  ]);
}
const RenderForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
  RenderForm as default
};
